-- GENERATED SPELL FOR [Ymirjar Necromancer] --


function spell0_28368(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(51432,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28368', 2000, 1)
end

function spell1_28368(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(59254,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28368', 2000, 1)
end

function spell2_28368(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(49205,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28368', 2000, 1)
end

function spell3_28368(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(59255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28368', 2000, 1)
end

function Sorts_28368(pUnit, Event)
local choix_sorts_28368 = math.random(0, 3)
if choix_sorts_28368 == 0 then
pUnit:RegisterEvent('spell0_28368', 1, 1)
end
if choix_sorts_28368 == 1 then
pUnit:RegisterEvent('spell1_28368', 1, 1)
end
if choix_sorts_28368 == 2 then
pUnit:RegisterEvent('spell2_28368', 1, 1)
end
if choix_sorts_28368 == 3 then
pUnit:RegisterEvent('spell3_28368', 1, 1)
end
end

function mob28368_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28368', math.random(1500, 3000), 1)
end

function mob28368_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28368_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28368_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28368, 1, 'mob28368_Action')
RegisterUnitEvent(28368, 2, 'mob28368_Leave')
RegisterUnitEvent(28368, 3, 'mob28368_Kill')
RegisterUnitEvent(28368, 4, 'mob28368_Die')
